package core;


import org.newdawn.slick.*;
import org.newdawn.slick.state.*;

import core.game_states.StateBattle;
import core.game_states.StateMainMenu;



public class TangleGame extends StateBasedGame
{
	public static final int ScreenX = 1024, ScreenY = 768, FPS = 80;
	public static final String gameTitle = "Tangle 0.00";
	public static final int STATE_MAIN_MENU = 0, STATE_BATTLE = 1;
	
	
	public TangleGame(String title)
	{
		super(title);
		this.addState(new StateMainMenu());
		this.addState(new StateBattle());
		
	}
	
	public void initStatesList(GameContainer gc) throws SlickException
	{
		this.getState(STATE_MAIN_MENU).init(gc, this);
		this.getState(STATE_BATTLE).init(gc, this);
		this.enterState(STATE_BATTLE);
	}
	
	public static void main(String[] args)
	{
		AppGameContainer appgc;
		try
		{
			appgc = new AppGameContainer(new TangleGame(gameTitle), ScreenX, ScreenY, false);
			appgc.setVSync(true);
			appgc.setTargetFrameRate(FPS);//Limit fps
//FULLSCREEN
//			appgc = new AppGameContainer(new Game(gameTitle), 
//					Toolkit.getDefaultToolkit().getScreenSize().width, 
//					Toolkit.getDefaultToolkit().getScreenSize().height, true);
			appgc.start();

			
		}
		catch(SlickException ex)
		{
			ex.printStackTrace();
		}
	}

}
